<?php
/**
 * Created by PhpStorm.
 * Author: kaodou
 * Date: 2018/3/9
 * Time: 17:39
 */

namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;

class BuyersRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Buyers\Controllers', 'prefix'=>'buyers'], function ($router) {

            //单位
            $router->any('list', 'IndexController@getList');
            $router->any('all', 'IndexController@getAll');
            $router->any('info', 'IndexController@getInfo');
            $router->any('add', 'IndexController@buyersAdd');
            $router->any('edit', 'IndexController@buyersEdit');
            $router->any('del', 'IndexController@buyersDel');

            //单位地址
            $router->any('address-list', 'AddressController@lists');
            $router->any('address-add', 'AddressController@edit');
            $router->any('address-edit', 'AddressController@edit');
            $router->any('address-del', 'AddressController@del');
            //单位备案资料
            $router->any('img-list', 'BuyersController@index');
            $router->any('img-modify', 'BuyersController@modify');
            //单位品名
            $router->any('product-imgList', 'BuyersProductController@imgList');
            $router->any('product-imgEdit', 'BuyersProductController@imgEdit');


            //单位-品命
            //列表
            $router->any('getBuyersProductList', 'IndexController@getBuyersProductList');
            //添加&修改
            $router->any('editBuyersProduct', 'IndexController@editBuyersProduct');
            //删除
            $router->any('delBuyersProduct', 'IndexController@delBuyersProduct');


            //单位-开票资料-列表
            $router->any('getBuyersInvoiceList', 'IndexController@getBuyersInvoiceList');
            //单位-开票资料-添加&修改
            $router->any('editBuyersInvoice', 'IndexController@editBuyersInvoice');
            //单位-开票资料-删除
            $router->any('delBuyersInvoice', 'IndexController@delBuyersInvoice');

            //单位详情信息（包含子栏目数量）
            $router->any('getBuyersList', 'IndexController@getBuyersList');


        });
    }
}